package cn.hm.goods;

import cn.hm.common.utils.IdWorker;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.context.annotation.Bean;
import tk.mybatis.spring.annotation.MapperScan;

/**
 * @author Mxb
 * @version 1.0
 * @date 2020/8/11 16:11
 */
@SpringBootApplication
@EnableEurekaClient
// 开启通用Mapper的包扫描
@MapperScan(basePackages = {"cn.hm.goods.mapper"})
public class GoodsApplication {

    public static void main(String[] args) {
        SpringApplication.run(GoodsApplication.class, args);
    }

    /***
     * IdWorker 雪花算法id生成器
     * @return
     */
    @Bean
    public IdWorker idWorker(){
        return new IdWorker(0,0);
    }
}
